<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:s="http://jboss.com/products/seam/taglib"
      xmlns:p="http://primefaces.org/ui">

<h:head>
	<title>TravelDream - Naviga</title>
</h:head>
	<h:body>

<p:panel header="Naviga" >
	 <p:separator style="margin-bottom:20px"/>

<h:form id="Alloggio">
<p:panel header="Alloggio">


<p:outputLabel style="width:10%">Luogo Alloggio</p:outputLabel>
	<p:inputText value="#{browser.sluogoAlloggio}" style="width:10%"></p:inputText>
	
	<p:outputLabel style="width:10%">Data Check-In</p:outputLabel>
	
	
	<p:calendar id="datacheckin" value="#{browser.scheckIN}" pattern="dd/MM/yyyy" style="width:10%"/>
	<p:dialog header="Selected Dates" widgetVar="dialogai" showEffect="fold" hideEffect="fold">  
  
        <h:panelGrid id="displayai" columns="2" cellpadding="5">  
  
            	<h:outputText value="Data Partenza: " />  
            <h:outputText value="#{browser.scheckIN}">  
                <f:convertDateTime pattern="dd/MM/yyyy" />  
            </h:outputText>             
       </h:panelGrid>    
    </p:dialog>   
	
	<p:outputLabel style="width:10%">Data Check-Out</p:outputLabel>
	
	<p:calendar id="checkout" value="#{browser.scheckOUT}" pattern="dd/MM/yyyy" style="width:10%" />
	<p:dialog header="Selected Dates" widgetVar="dialogao" showEffect="fold" hideEffect="fold">  
  
        <h:panelGrid id="displayao" columns="2" cellpadding="5">  
  
            	<h:outputText value="Data Partenza: " />  
            <h:outputText value="#{browser.scheckOUT}">  
                <f:convertDateTime pattern="dd/MM/yyyy" />  
            </h:outputText>             
       </h:panelGrid>    
    </p:dialog>   
    
    <p:commandButton value="cerca" update="Alloggio" action="#{browser.searchAlloggi()}" style="width:10%"></p:commandButton>
 	<p:commandButton value="reset" update="Alloggio" action="#{browser.init()}" style="width:10%"></p:commandButton>
    

<p:dataGrid var="all" value="#{browser.alloggi}" columns="3" 
		rows="6" paginator="true"
		paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
		rowsPerPageTemplate="9,12,15" >

        <p:panel header="#{all.nome}" style="text-align:center">
            <h:panelGrid columns="1" style="width:100%">
                
				
                       
             	<h:outputText value="Citta: #{all.citta}"/>
               	 <h:outputText value="Prezzo: #{all.prezzo}" />
                 <p:commandLink  title="View Detail" action="#{visualizzacmp.showCmp}">
                    
 					 <h:outputText styleClass="ui-icon ui-icon-search" style="margin:0 auto;" /> 
                    <f:setPropertyActionListener value="#{all}" 
                            target="#{visualizzacmp.selectedComponente}" />
                </p:commandLink>
                
            </h:panelGrid>
         </p:panel>
	</p:dataGrid>
</p:panel>	
</h:form> 
	
	 <p:separator style="margin-bottom:20px"/>
	
	
<h:form id="Trasporto">
<p:panel header="Trasporto">

	<p:outputLabel style="width:10%">Luogo Partenza</p:outputLabel>
	<p:inputText value="#{browser.sluogoPartenza}" style="width:10%"></p:inputText>
	
	<p:outputLabel style="width:10%">Luogo Arrivo</p:outputLabel>
	<p:inputText value="#{browser.sluogoArrivo}" style="width:10%"></p:inputText>
	
	<p:outputLabel style="width:10%">Data Partenza</p:outputLabel>
	
	<p:calendar id="datapartenza" value="#{browser.sdataPartenza}" pattern="dd/MM/yyyy" />
	<p:dialog header="Selected Dates" widgetVar="dialogt" showEffect="fold" hideEffect="fold">  
  
        <h:panelGrid id="displayt" columns="2" cellpadding="5">  
  
            	<h:outputText value="Data Partenza: " />  
            <h:outputText value="#{browser.sdataPartenza}">  
                <f:convertDateTime pattern="dd/MM/yyyy" />  
            </h:outputText>             
       </h:panelGrid>    
    </p:dialog>   
    
	



	<p:commandButton value="cerca" update="Trasporto" action="#{browser.searchTrasporti()}"></p:commandButton>
 	<p:commandButton value="reset" update="Trasporto" action="#{browser.init()}"></p:commandButton>

	<p:dataGrid var="all" value="#{browser.trasporto}" columns="3"
		rows="6" paginator="true"
		paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
		rowsPerPageTemplate="9,12,15" >

        <p:panel header="#{all.nome}" style="text-align:center">
            <h:panelGrid columns="1" style="width:100%">
                

                <h:outputText value="Data: #{all.dataPartenza}" />
                <h:outputText value="Partenza: #{all.luogoPartenza}" />
                <h:outputText value="Destinazione: #{all.luogoDestinazione}" />
                 

                <p:commandLink title="View Detail" action="#{visualizzacmp.showCmp()}">
                    <h:outputText styleClass="ui-icon ui-icon-search" style="margin:0 auto;" /> 
                    <f:setPropertyActionListener value="#{all}" 
                            target="#{visualizzacmp.selectedComponente}" />
                </p:commandLink>
            </h:panelGrid>
         </p:panel>
	
	</p:dataGrid>
</p:panel>	
</h:form> 	
	
		 <p:separator style="margin-bottom:20px"/>
	
	
<h:form id="Escursione">
<p:panel header="Escursione">


	<p:inputText value="#{browser.snomeEsc}" style="width:100px">Nome</p:inputText>
	<p:inputText value="#{browser.sluogoEsc}" style="width:100px">Luogo</p:inputText>
	
	<p:commandButton value="cerca" update="Escursione" action="#{browser.searchForEscursione()}" style="width:100px"></p:commandButton>
 	<p:commandButton value="reset" update="Escursione" action="#{browser.init()}" style="width:100px "></p:commandButton>
	
	<p:dataGrid var="all" value="#{browser.escursioni}" columns="3"
		rows="6" paginator="true"
		paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
		rowsPerPageTemplate="9,12,15" >

        <p:panel header="#{all.nome}" style="text-align:center">
            <h:panelGrid columns="1" style="width:100%">
                

                <h:outputText value="Luogo: #{all.luogo}" />
                <h:outputText value="Prezzo: #{all.prezzo}" />
                

                <p:commandLink  title="View Detail" action="#{visualizzacmp.showCmp}">
                    <h:outputText styleClass="ui-icon ui-icon-search" style="margin:0 auto;" /> 
                    <f:setPropertyActionListener value="#{all}" 
                            target="#{visualizzacmp.selectedComponente}" />
                </p:commandLink>
            </h:panelGrid>
         </p:panel>
	</p:dataGrid>
</p:panel>	
</h:form> 

	 <p:separator style="margin-bottom:20px"/>

<h:form id="Pacchetto">
<p:panel header="Pacchetto">


<p:outputLabel style="width:10%">Luogo</p:outputLabel>
	<p:inputText value="#{browser.sluogoPacc}" style="width:10%"></p:inputText>
	
	<p:outputLabel style="width:10%">Nome Pacchetto</p:outputLabel>
	<p:inputText value="#{browser.snomePacc}" style="width:10%"></p:inputText>
	
	<p:outputLabel style="width:10%">Data</p:outputLabel>
	
	<p:calendar id="datapartenzaPacc" value="#{browser.sdataPacc}" pattern="dd/MM/yyyy" />
	<p:dialog header="Selected Dates" widgetVar="dialogtp" showEffect="fold" hideEffect="fold">  
  
        <h:panelGrid id="displaytp" columns="2" cellpadding="5">  
  
            	<h:outputText value="Data Partenza: " />  
            <h:outputText value="#{browser.sdataPacc}">  
                <f:convertDateTime pattern="dd/MM/yyyy" />  
            </h:outputText>             
       </h:panelGrid>    
    </p:dialog>   
    
	



	<p:commandButton value="cerca" update="Pacchetto" action="#{browser.searchPacchetti()}"></p:commandButton>
 	<p:commandButton value="reset" update="Pacchetto" action="#{browser.init()}"></p:commandButton>



	<p:dataGrid var="all" value="#{browser.pacchetti}" columns="3"
		rows="6" paginator="true"
		paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
		rowsPerPageTemplate="9,12,15" >

        <p:panel header="#{all.nome}" style="text-align:center">
            <h:panelGrid columns="1" style="width:100%" >
                
				                 <h:outputText value="Data: #{all.andata.dataPartenza}" />
				            <h:outputText value="Luogo #{all.andata.luogoDestinazione}" />
				                 
				                <h:outputText value="Prezzo: #{all.prezzo}" />

                <p:commandLink  title="View Detail" action="#{showPkgMB.loadPkg}" >
                    <h:outputText styleClass="ui-icon ui-icon-search" style="margin:0 auto;" /> 
                    <f:setPropertyActionListener value="#{all}" 
                            target="#{showPkgMB.pacchettoDTO}" />
                </p:commandLink>
            </h:panelGrid>
         </p:panel>
	</p:dataGrid>
</p:panel>	
</h:form> 	
	

</p:panel>
    
</h:body>

</html>